using System;
using System.Collections.Generic;
using System.Text;

namespace SqlTools.DataAccessLibrary
{
	public class PrimaryKeyEqualityComparer<PK> : IEqualityComparer<PK>
		where PK : PrimaryKey
	{
		#region IEqualityComparer<PK> Members

		public bool Equals(PK x, PK y)
		{
			return x.Equals(y);
		}

		public int GetHashCode(PK obj)
		{
			return obj.GetHashCode();
		}

		#endregion

		#region IEqualityComparer<PK> Members

		bool IEqualityComparer<PK>.Equals(PK x, PK y)
		{
			return x.Equals(y);
		}

		int IEqualityComparer<PK>.GetHashCode(PK obj)
		{
			return obj.GetHashCode();
		}

		#endregion
	}
}
